package com.sls.game.dao;

import java.util.List;

import com.sls.game.page.Pagination;
import com.sls.game.pojo.GoodsOrderInfo;
import com.sls.game.querybean.GoodsOrderQuery;

/**
 * 
 * @description 网游充值订单表DAO
 * @author Wangxuegang
 * @date 2012-9-6
 * 
 */
public interface GoodsOrderDAO {

	/**
	 * 插入
	 * 
	 * @param goodsOrderInfo
	 */
	public void insert(GoodsOrderInfo goodsOrderInfo);

	/**
	 * 更新
	 * 
	 * @param goodsOrderInfo
	 */
	public void update(GoodsOrderInfo goodsOrderInfo);

	/**
	 * 订单查询(单条记录)
	 * 
	 * @param orderId
	 *            订单编号
	 */
	public GoodsOrderInfo queryByOrderId(String orderId);

	/**
	 * 订单查询(符合条件的多条记录)
	 * 
	 * @param goodsOrderInfo
	 * 
	 */
	public GoodsOrderInfo query(GoodsOrderInfo goodsOrderInfo);

	/**
	 * 根据商户订单号和用户账号，查询记录相关信息
	 * 
	 * @param merchantOrderId
	 * @return
	 */
	public GoodsOrderInfo queryByMerchantOrderId(GoodsOrderInfo goodsOrderInfo);

	/**
	 * 查询订单编号最大的记录
	 * 
	 * @return
	 */
	public String queryMaxOrderId();

	/**
	 * 根据下游用户账号和下游用户订单号，查询单条记录
	 * 
	 * @param goodsOrderInfo
	 * @return
	 */
	public String queryOrderIsExtisOfUserNo(GoodsOrderInfo goodsOrderInfo);

	/**
	 * 根据条件分页查询
	 * 
	 * @param orderQuery
	 * @return
	 */
	public Pagination<GoodsOrderInfo> queryOrders(GoodsOrderQuery orderQuery);

	/**
	 * 查询供应商名称列表
	 * 
	 * @return
	 */
	public List<String> querySupplyNameList();

	/**
	 * 根据供应商名称查询订单信息列表
	 * 
	 * @param supplyName
	 * @return
	 */
	public List<GoodsOrderInfo> queryOrderInfoBySupplyName(
			GoodsOrderInfo goodsOrderInfo);

	/**
	 * 根据订单编号，查询回调地址
	 * 
	 * @param orderId
	 * @return
	 */
	public GoodsOrderInfo queryNotifyUrlByOrderId(String orderId);

	/**
	 * 查询未异步推送给下游的订单记录
	 * 
	 * @param synOrAsy
	 * @return
	 * @author Wangxg
	 * @date 2013-01-31
	 */
	public List<GoodsOrderInfo> queryGoodsOrderInfoList(String synOrAsy);

	/**
	 * 根据上游供应商编号、支付状态成功、订单状态处理中查询相关记录
	 * 
	 * @param goodsOrderInfo
	 * @return
	 * @date 2013-03-22
	 */
	public List<GoodsOrderInfo> queryOrderBySomeConditions(
			GoodsOrderInfo goodsOrderInfo);

	/**
	 * 查询订单中的工号
	 * 
	 * @return
	 */
	public List<GoodsOrderQuery> queryRegisterAccount(
			GoodsOrderQuery goodsOrderQuery);

	public Long queryOrderTotalPrice(GoodsOrderQuery goodsOrderQuery);

	public Long queryOrderCostTotalPrice(GoodsOrderQuery goodsOrderQuery);

	public Long queryOrderTotalParvalue(GoodsOrderQuery goodsOrderQuery);
	
	public Long queryOrderTotalNum(GoodsOrderQuery goodsOrderQuery);
}
